<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>服务协议</title>
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
		<script type="text/javascript" src="__PUBLIC__/static/js/jquery.min.js"></script>
		<link rel="stylesheet" href="/public/static/layui/css/layui.css">
		<script src="__PUBLIC__/static/layui/layui.js"></script>
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<div class="rigtop">
						<span class="title">服务协议</span>
					</div>			
					<form id="my_form" class="layui-form form-container" action="{:url('service')}" method="post">
						<div class="layui-form-item" >
							<label class="layui-form-label">内容</label>
							<div class="layui-input-block">
								<script style="width:960px;height:600px" id="content" name="content" type="text/plain">
									{if isset($service_config)}{$service_config|html_entity_decode}{/if}
								</script>
							</div>
						</div>
						<div class="layui-form-item update_btnbox" style="text-align: center;margin-left:unset">
							<div class="layui-input-block" style="max-width: unset;float: unset;">
								<button  id='change_but' class="layui-btn" type="button" onclick="set_content()"  lay-filter="demo1">立即提交</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		{include file="public/footer" /}
	</body>

</html>

<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<script>
	var ue = UE.getEditor('content', {
        initialFrameHeight: 450,
		serverUrl: "{:url('/admin/ueditor/index?cate=news')}"
	});

	//提交表单
	function set_content(){
  		 $.ajax({
             	type:"post",
                url:"{:url('helps/service')}",
 				data: $('#my_form').serialize(),//表单数据
                success:function(data){
                	layer.msg(data.msg, {
					  icon: 1,
					  time: 1500 //2秒关闭（如果不配置，默认是3秒）
					}, function(){
						
					});
                },error:function(data){
                	var a = data;
                }
        });
  		
  	}

</script>